package com.xl.coalbum.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xl.coalbum.model.dto.picture.PictureQueryRequest;
import com.xl.coalbum.model.vo.PictureVO;
import com.xl.coalbum.model.vo.space.analyze.SpaceTagAnalyzeResponse;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

public interface PictureSearchService {

    Page<PictureVO> searchPicture(PictureQueryRequest pictureQueryRequest) throws IOException;

    /**
     * 批量保存
     * @param pictures
     * @return
     * @throws IOException
     */
    boolean bulkSavePicturesToEs(List<PictureVO> pictures) throws IOException;

    /**
     * 单个图片保存
     * @param pictureVO
     * @return
     * @throws IOException
     */
    boolean savePictureToEs(PictureVO pictureVO) throws IOException;

    /**
     * 保存所有已通过审核的图片
     * @return
     * @throws IOException
     */
    boolean saveAllPassedPic() throws IOException;

    /**
     * 标签分析
     * @param size
     * @return
     * @throws IOException
     */
    List<SpaceTagAnalyzeResponse> getTagList(int size,Long spaceId) throws IOException;
}
